package com.rpctest.myrpc.common;


import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import java.io.Serializable;

/**
 * @ClassName USer
 * @Description TODO
 * @Author 11
 * @Date 2021/3/31 14:25
 * @Version 1.0
 */

///必须实现Serializable接口
public class User implements IuserService, Serializable {
    private int id;
    private String name;

    @Override
    public User findUserID(Integer id) {
        return new User(id,"By_findUserID");
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }
    public User() {
        this.id = 0;
        this.name = "";
    }
    public User(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public Integer getId() {
        return id;
    }

    public String getName() {
        return name;
    }
}
